package com.dt.system.service.impl;

import java.util.List;
import com.dt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dt.system.mapper.ModRepositoriesLayerMapper;
import com.dt.system.domain.ModRepositoriesLayer;
import com.dt.system.service.IModRepositoriesLayerService;

@Service
public class ModRepositoriesLayerServiceImpl implements IModRepositoriesLayerService 
{
    @Autowired
    private ModRepositoriesLayerMapper modRepositoriesLayerMapper;

    /**
     * 查询
     * 
     * @param id 主键
     * @return
     */
    @Override
    public ModRepositoriesLayer selectModRepositoriesLayerById(Long id)
    {
        return modRepositoriesLayerMapper.selectModRepositoriesLayerById(id);
    }

    /**
     * 查询列表
     * 
     * @param modRepositoriesLayer
     * @return
     */
    @Override
    public List<ModRepositoriesLayer> selectModRepositoriesLayerList(ModRepositoriesLayer modRepositoriesLayer)
    {
        return modRepositoriesLayerMapper.selectModRepositoriesLayerList(modRepositoriesLayer);
    }

    /**
     * 新增
     * 
     * @param modRepositoriesLayer
     * @return 结果
     */
    @Override
    public int insertModRepositoriesLayer(ModRepositoriesLayer modRepositoriesLayer)
    {
        modRepositoriesLayer.setCreateTime(DateUtils.getNowDate());
        return modRepositoriesLayerMapper.insertModRepositoriesLayer(modRepositoriesLayer);
    }

    /**
     * 修改
     * 
     * @param modRepositoriesLayer
     * @return 结果
     */
    @Override
    public int updateModRepositoriesLayer(ModRepositoriesLayer modRepositoriesLayer)
    {
        modRepositoriesLayer.setUpdateTime(DateUtils.getNowDate());
        return modRepositoriesLayerMapper.updateModRepositoriesLayer(modRepositoriesLayer);
    }

    /**
     * 批量删除
     * 
     * @param ids 需要删除的主键
     * @return 结果
     */
    @Override
    public int deleteModRepositoriesLayerByIds(Long[] ids)
    {
        return modRepositoriesLayerMapper.deleteModRepositoriesLayerByIds(ids);
    }

    /**
     * 删除信息
     * 
     * @param id 主键
     * @return 结果
     */
    @Override
    public int deleteModRepositoriesLayerById(Long id)
    {
        return modRepositoriesLayerMapper.deleteModRepositoriesLayerById(id);
    }


    /**
     * 批量新增
     *
     */
    public int batchInsertModRepositoriesLayer(List<ModRepositoriesLayer> dataList)
    {
        return modRepositoriesLayerMapper.batchInsertModRepositoriesLayer(dataList);
    }
}
